class InitialSchema < ActiveRecord::Migration

  def self.up

    create_table :projects do |table|
      table.column :name, :string
    end

    create_table :iterations do |table|
      table.column :start_date, :date
      table.column :end_date, :date
      table.column :lessons_learned, :text
    end

    create_table :deliverables do |table|
      table.column :description, :string
      table.column :resources, :string
      table.column :project_id, :integer
      table.column :iteration_id, :integer
      table.column :status, :string
      table.column :comments, :text
    end

    create_table :open_issues do |table|
      table.column :description, :string
      table.column :comments, :text
    end

  end

  def self.down
    drop_table :projects
    drop_table :iterations
    drop_table :deliverables
    drop_table :open_issues
  end
end
